package com.feign.service;

import com.feign.hystrix.SsoClientServiceHystrix;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by yangjianbo on 2016/10/19.
 */
//@FeignClient(value = "auth-sso",fallback = SsoClientServiceHystrix.class)
public interface SsoClientService {

    @RequestMapping(method = RequestMethod.POST, value = "sso/login")
    String login(@RequestParam(value = "username")  String username,
                 @RequestParam(value = "password")  String password,
                 @RequestParam(value = "clientAgent")     String clientAgent,
                 @RequestParam(value = "clientIp")  String clientIp,
                 @RequestParam(value = "referer")   String referer);

    @RequestMapping(method = RequestMethod.POST, value = "sso/get")
    String get(@RequestParam(value = "clientAgent") String clientAgent,
               @RequestParam(value = "clientIp")  String clientIp);

    @RequestMapping(method = RequestMethod.POST, value = "sso/out")
    String out(@RequestParam(value = "clientIp") String clientIp,
               @RequestParam(value = "clientAgent")  String clientAgent);
}
